{% extends 'news/base.html' %}

{# 1.重写标题部分 #}
{% block titleBlock %}
    <title>用户中心</title>
{% endblock %}

{# 2.script部分 #}
{% block scriptBlock %}
    <script type="text/javascript" src="../../static/news/js/jquery.form.min.js"></script>
{% endblock %}

{# 3.正文部分 #}
{% block contentBlock %}
    <div class="user_menu_con fl">
        <div class="user_center_pic">

            {# 判断是否有用户的头像,有的话显示用户的头像,没有的话,显示默认的头像 #}
            {% if data.user_info.avatar_url %}
                <img src="{{ data.user_info.avatar_url }}" alt="用户图片">

            {% else %}
                <img src="../../static/news/images/user_pic.png" alt="用户图片">

            {% endif %}

        </div>
        <div class="user_center_name">{{ data.user_info.nick_name }}</div>

        <ul class="option_list">
            <li class="active"><a href="/user/base_info" target="main_frame">基本资料</a></li>
            <li><a href="/user/pic_info" target="main_frame">头像设置</a></li>
            <li><a href="/user/user_follow" target="main_frame">我的关注</a></li>
            <li><a href="/user/pass_info" target="main_frame">密码修改</a></li>
            <li><a href="/user/collection" target="main_frame">我的收藏</a></li>
            <li><a href="/user/news_release" target="main_frame">新闻发布</a></li>
            <li><a href="/user/news_list" target="main_frame">新闻列表</a></li>
        </ul>
    </div>
    <div class="user_con fr">
		<iframe src="/user/base_info" frameborder="0" name="main_frame" class="main_frame" id="main_frame"></iframe>
	</div>
{% endblock %}

{# 4.rank部分 #}
{% block rankBlock %}

{% endblock %}


